package demo3;

public class Text01 {
    public static void main(String[] args) throws InterruptedException {
        MyTimer timer = new MyTimer();
        timer.schedule(() -> {
            System.out.println("马上执行任务一...");
        },0);
        timer.schedule(() -> {
            System.out.println("马上执行任务二...");
        },0);
        timer.schedule(() -> {
            System.out.println("马上执行任务三...");
        },0);
        timer.schedule(() -> {
            System.out.println("该起床了...");
        },1000);
        timer.schedule(() -> {
            System.out.println("洗漱...");
        },2000);
        timer.schedule(() -> {
            System.out.println("吃饭...");
        },3000);
    }
}
